<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%-- 
    Document   : nuevoSanitario
    Created on : 29/03/2010, 11:03:02
    Author     : Administrador
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<jsp:include page="/WEB-INF/seguridad.jspf"/>
<%@page import="java.util.List"%>
<%@page import="Persistencia.Entidades.Exportador" %>
<%@page import="Persistencia.Entidades.Importador" %>
<%@page import="Persistencia.DAOFactory" %>
<%@page import="Persistencia.Entidades.ResponsableSenasa" %>
<%@page import="Persistencia.Entidades.Transporte" %>
<jsp:useBean id="lExpo" scope="request" type="java.util.List<Exportador>"/>
<jsp:useBean id="lImpo" scope="request" type="java.util.List<Importador>"/>
<jsp:useBean id="lRespSenasa" scope="request" type="java.util.List<ResponsableSenasa>"/>
<jsp:useBean id="lTransp" scope="request" type="java.util.List<Transporte>"/>


<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script type="text/javascript" src="menu/stmenu.js"></script>
    </head>
    <body>
        <center>

            <h1>Nuevo Sanitario</h1>
            <form action="nuevoSanitario.html" method="POST">
                <table align="center" border="0" cellspacing="5">
                    <tr>
                        <th align="right">Número Sanitario:</th>
                        <td align="left"> <input type="text" name="numSanitario" value="" />*</td>
                    </tr>
                    <tr>
                        <th align="right">Exportador:</th>
                        <td align="left"><select name="exportador">
                               
                                <option value=""></option>
                                <c:forEach var="expo" items="<%=lExpo%>">
                                    <option value=<c:out value="${expo.idExportador}"/>><c:out value="${expo.razonSocial}"/></option>
                                </c:forEach>


                            </select>*</td>
                    </tr>
                   <tr>
                        <th align="right">Importador:</th>
                        <td align="left"><select name="importador">
                                <option value=""></option>
                                <c:forEach var="impo" items="<%=lImpo%>">
                                    <option value=<c:out value="${impo.idImportador}"/>><c:out value="${impo.razonSocial}"/></option>
                                </c:forEach>


                            </select>*</td>
                    </tr>
                    <tr>
                        <th align="right">Provisorio:</th>
                        <td align="left"><input  type="text" name="provisorio" value="" />*</td>
                    </tr>
                    <tr>
                        <th align="right">Fecha Emisión:</th>
                        <td align="left"> <input type="text" name="fechaEmision" value="" />*</td>
                    </tr>
                    <tr>
                        <th align="right">Fecha Firma:</th>
                        <td align="left"><input  type="text" name="fechaFirma" value="" /></td>
                    </tr>
                    <tr>
                        <th align="right">Responsable Senasa:</th>
                        <td align="left"><select name="responsableSenasa">
  
                                <option value=""></option>
                                <c:forEach var="respSenasa" items="<%=lRespSenasa%>">
                                    <option value=<c:out value="${respSenasa.idResponsable}"/>><c:out value="${respSenasa.apellido}, ${respSenasa.nombre}"/></option>
                                </c:forEach>


                            </select>*</td>
                    </tr>
                    <tr>
                        <th align="right">Transporte:</th>
                        <td align="left"><select name="transporte">
                               <option value=""></option>
                                <c:forEach var="transp" items="<%=lTransp%>">
                                    <option value=<c:out value="${transp.idTransporte}"/>><c:out value="${transp.razonSocial}"/></option>
                                </c:forEach>


                            </select>*</td>
                    </tr>
                    <tr>
                        <th align="right">Placas:</th>
                        <td align="left"><input  type="text" name="placas" value="" /></td>
                    </tr>
                    <tr>
                        <td align="right"><input type="submit" value="Enviar" /></td>

                    </tr>
                </table>
                <% if (request.getAttribute("mensaje") != null) {
                                out.println(request.getAttribute("mensaje").toString());
                            }%>

            </form>
        </center>
    </body>
</html>
